const Router = require('koa-router');


const router = Router();

const auth = require('../middleware/auth')


const Tag = require('../controllers/tag.controller')



router
  .post('/insert', auth(), Tag.addTag)//添加标签
  .get('/all',auth({required: false}),Tag.allTag)//获取全部标签
  .post('/update',auth(),Tag.updateTag)//更新标签
  .post('/delete',auth(),Tag.deleteTag)//删除标签

module.exports = router